package com.ysk.test.demo.service.impl;

import com.ysk.test.demo.mapper.RoleMapper;
import com.ysk.test.demo.pojo.Role;
import com.ysk.test.demo.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class RoleServiceImpl implements RoleService {
    @Autowired
    private RoleMapper roleMapper;
    @Override
    public List<Role> findAll() {
        return roleMapper.findAll();
    }

    @Override
    public int save(String rName) {
        return roleMapper.save(rName);
    }

    @Override
    public int delete(Integer rId) {
        return roleMapper.delete(rId);
    }

    @Override
    public int update(Integer rId, String rName) {
        return roleMapper.update(rId,rName);
    }
}
